<!DOCTYPE html>
<HTML lang="zh-CN" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>成绩评定页面</title>
    <script src="js/selectcourse/vue.min.js"></script>
    <script src="js/selectcourse/vue-resource.min.js"></script>
    <script type="text/javascript" src="js/selectcourse/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="css/selectcourse/bootstrap.min.css" />
    <script type="text/javascript" src="js/selectcourse/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="css/selectcourse/zftal-ui.css" />
    <link href="css/selectcourse/selectcourse.css" rel="stylesheet" type="text/css">
    <script>
        function f(judge) {
            if(judge==1)
                alert("提交成功！");
            else if(judge==0)
                alert("成绩已提交");
        }
    </script>
    <style type="text/css">
        body{margin:0;padding:0}
        .top{height:50px;background: #7abaff}
        .up{width:90%;height:25%;background: white;margin:20px auto}
        .down{width:90%;height:70%;background: white;margin:20px auto}
        .foot{height:5%;background:antiquewhite;margin:0 auto}
    </style>
</head>
<body th:onload="'javascript:f('+${judge}+');'">
<header class="navbar-inverse top2">
    <div class="container" id="navbar_container">
        <div class="container">
            <div class="navbar-header">
                <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
                    <span class="sr-only" style="gray">成绩评定</span>
                </button>
                <A class="navbar-brand" id="topbutton" href="">成绩评定</A>
            </div>
        </div>
    </div>
</header>
<div id="bodyContainer" style="margin: 0px; padding: 0px; width: 100%;">
    <div class="container container-func sl_all_bg" id="yhgnPage" style=" height: 500px;">
        <div class="pre-scrollable " style="overflow:scroll;">
            <div class="panel panel-info"  >
                <div class="panel-heading">&nbsp;</div>
                <table class="table table-striped table-bordered table-hover table-responsive">
                    <thead>
                    <tr>
                        <th>论题题目</th>
                        <th>学生学号</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="choice: ${choices}">
                        <td >
                            <a th:href="@{'/TeaQuesDetails?questionid='+${choice.questionid}}" target="_self">
                                <p th:text="${choice.questionid}"></p>
                            </a>
                        </td>
                        <td th:text="${choice.sno == -1}?'未选学生': ${choice.sno}"></td>
                        <td>
                            <form method="post" action="#" th:action="@{/TeaAddScore}">
                                <div class="row">
                                <div class="col-lg-2">
                                    <label for="s1">初期表现10%</label>
                                    <input type="text" class="form-control" name="earlyperformance" id="s1" placeholder="文本输入" required="required">
                                </div>
                                <div class="col-lg-2">
                                    <label for="s2">中期考核20%</label>
                                    <input type="text" class="form-control" name="midexam" id="s2" placeholder="文本输入" required="required">
                                </div>
                                <div class="col-lg-2">
                                    <label for="s3">答辩30%</label>
                                    <input type="text" class="form-control" name="thesisanswer" id="s3" placeholder="文本输入" required="required">
                                </div>
                                <div class="col-lg-2">
                                    <label for="s4">论文30%</label>
                                    <input type="text" class="form-control" name="paper" id="s4" placeholder="文本输入" required="required">
                                </div>
                                <div class="col-lg-2">
                                    <label for="s5">额外加分10%</label>
                                    <input type="text" class="form-control" name="extracredit" id="s5" placeholder="文本输入" required="required">
                                </div>
                                <div style="text-align: center;">
                                    <input type="submit" data-inline="true" value="提交">
                                    <input type="text" name="questionid" th:value="${choice.questionid}" style="display:none;" />
                                    <input type="text" name="sno" th:value="${choice.sno}" style="display:none;" />
                                </div>
                                </div>
                            </form>
                        </td>
                    </tr>
                    </tbody>
                </table>
            <div id="pagebox">
                <a href="#">首页</a>
                <a href="#">上一页</a>
                <a href="#">下一页</a>
                <a href="#">末页</a>
            </div>
            </div>
        </div>
    </div>
</div>
<div id="footerID" class="footer">
    版权所有&copy; Copyright 2016-2019 计科1601班
</div>
</body>
</html>